package com.ads.tpgrupo4.server.fileserver;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

public class FileServer {
	
	public static void createFile(final String content, final String filePath)
			throws Exception {

		Path path = Paths.get(filePath);
		Files.createDirectories(path.getParent());
		Files.createFile(path);
		Files.write(path, content.getBytes());
	}

	// Demo
	public static void main(String[] args) throws Exception {
		
		createFile("<miXml></miXml>", "C://temp//demoFileServer.xml");
		
	}

}
